<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <div>
      <button @click="show('a')">index</button>
      <button @click="show('b')">test</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  methods: {
    show(index) {
      if(index == 'a') {
        this.$router.push('/index')
      }
      if(index == 'b') {
        this.$router.push('/test')
      }
    }
  }
}
</script>
